const mongoose = require('mongoose')
// const deletedCount = require('../utils/timeDelate')
async function main() {
    await mongoose.connect('mongodb://localhost:27017/hospital')
}

main().then(()=>{
    console.log("数据库连接成功");

}).catch(()=>{
    console.log("数据库连接失败");
})

module.exports = {
    hospitalModel:mongoose.model('Hospital',require('./hospitalModel')),
    departModel:mongoose.model('Depart',require('./departModel')),
   JobModel:mongoose.model('Job',require('./jobModel')),
   doctorAndJobModel:mongoose.model('DocAndJob',require('./doctorAndJobModel')),
   menuModel:mongoose.model('Menus',require('./menuModel')),
   menuAndJobModel:mongoose.model('MenuAndJob',require('./menuAndJobModel')),
   docSchedulingModel:mongoose.model('DocScheduling',require('./doctorScheduling')),
   callModel:mongoose.model('Call',require('./callModel')),
   bannerModel:mongoose.model('Banner',require('./bannerModel')),
   codeModel:mongoose.model('Code',require('./codeModel')),
   userModel:mongoose.model('User',require('./userModel')),
   reaNameModel:mongoose.model('ReaName',require('./reaNameModel')),
   PatientModel:mongoose.model('Patient',require('./PatientModel')),
   OrderModel:mongoose.model('Order',require('./orderModel'))
}